﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace TSL.Utility
{
    public class PageFactory : IHttpHandlerFactory
    {
        public virtual IHttpHandler GetHandler(HttpContext context,
                                             String requestType,
                                             String url,
                                             String pathTranslated)
        {
            Request request = new Request(context, requestType, url);
            if (!(request.Extension == jQueryAjaxUtility.HandlerExtension))
            {
                throw new HttpException(0x193, "对不起您请求的页面错误！");
            }
            return new jQueryHandler();
        }

        public virtual void ReleaseHandler(IHttpHandler handler)
        {
        }
    }
}
